<template>
	<view>
		<swiper autoplay="true" circular="true" class="banner" duration="300" indicatorDots="true" interval="5000"
		 :nextMargin="param.style==2?upx_60:''" :previousMargin="param.style==2?upx_60:''" :style="{padding:0,height:param.height?param.height:upx_360}">
			<swiper-item style="text-align:center" v-for="(item,index) in param.banner_list" :key="item.id">
				<form @submit="$emit('_formIdSubmit',$event)" :data-type="item.open_type=='wxapp'?'':'navigate'" :data-url="item.page_url" reportSubmit="true">
					<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
						<navigator :appId="item.appId" @tap="$emit('navigatorClick',$event)" :data-open_type="item.open_type" :data-url="item.page_url"
						 :path="item.path" style="z-index:9" :target="item.open_type=='wxapp'?'miniProgram':''">
							<view class="slide-title">{{item.title}}</view>
							<image :class="['slide-image-'+(param.style==2?param.style:'1')]" :mode="param.fill==0?'aspectFit':'aspectFill'"
							 :src="item.pic_url" :style="{padding:0,height:param.height?param.height:upx_360}"></image>
						</navigator>
					</button>
				</form>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>var myVue = {};
	export default {
		props: ['param'],
		computed: {
			new_height() {
				return uni.upx2px(this.param.height) + 'px';
			},
			upx_60(){
				return uni.upx2px(60) + 'px';
			},
			upx_360(){
				return uni.upx2px(360) + 'px';
			}
		},
		data() {
			return {
				
			};
		},
		onLoad(){
		}
	}
</script>

<style>
</style>
